#include "GeoTiffMerger.hxx"

void usage(char** argv)
{
	printf("\n %s sourcedir targetimage [scaleFactor]\n", argv[0]);
}

int main(int argc, char *argv[])
{
	if (argc < 3)
	{
		usage(argv);
		return 0;
	}

	double scale = 0.1;

	GeoTiffMerger merger;

	if (argc == 4)
	{
		sscanf(argv[3], "%f", &scale);
		merger.setImageScaleFactor(scale);
	}

	merger.setSourceDirectory(argv[1]);
	merger.setDestFileName(argv[2]);

	merger.mergeTiffFiles();

    return 0;
}
